package vim.meet.javassist;

import javassist.util.proxy.MethodHandler;

import java.lang.reflect.Method;

public class ReadWriteHandler implements MethodHandler {

    @Override
    public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
        System.out.println(thisMethod);
        System.out.println(proceed);
        System.out.println(thisMethod.getName());
        System.out.println(proceed.getName());
        Object result = proceed.invoke(self, args);
        return result;
    }

}
